From: Chad Horohoe Date: Mon, 20 Apr 2009 14:32:41 +0000 (+0000) Subject: Followup to r49493: Tweak this so we only set the title if explicitly asking for... X-Git-Tag: 1.31.0-rc.0~42095 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=da5834962b28413b4b73b2acf46f41249d382e16;p=lhc%2Fweb%2Fwiklou.git Followup to r49493: Tweak this so we only set the title if explicitly asking for it or the Skin's title is null. Make $mTitle protected. --- diff --git a/includes/Skin.php b/includes/Skin.php index 39d93dd364..7994ca20b9 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -24,6 +24,7 @@ class Skin extends Linker { /**#@-*/ protected $mRevisionId; // The revision ID we're looking at, null if not applicable. protected $skinname = 'standard'; + protected $mTitle = null; /** Constructor, call parent constructor */ function Skin() { parent::__construct(); } @@ -283,6 +284,11 @@ class Skin extends Linker { public function setTitle( $t ) { $this->mTitle = $t; } + + /** Get the title */ + public function getTitle() { + return $this->mTitle; + } function outputPage( OutputPage $out ) { global $wgDebugComments; @@ -1920,4 +1926,4 @@ END; wfProfileOut( __METHOD__ ); return $bar; } -} +} \ No newline at end of file diff --git a/includes/User.php b/includes/User.php index c1d266433b..c7c865e4a2 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2166,11 +2166,13 @@ class User { $this->mSkin =& Skin::newFromKey( $userSkin ); wfProfileOut( __METHOD__ ); } - if ( !$t ) { - global $wgOut; - $t = $wgOut->getTitle(); + if( $t || !$this->mSkin->getTitle() ) { + if ( !$t ) { + global $wgOut; + $t = $wgOut->getTitle(); + } + $this->mSkin->setTitle( $t ); } - $this->mSkin->setTitle( $t ); return $this->mSkin; } @@ -3515,4 +3517,4 @@ class User { return true; } -} +} \ No newline at end of file